from django.db import models

# Create your models here.
from django.db import models


class GoodsCategory(models.Model):
    cag_name = models.CharField(max_length=255)  # 商品分类名称
    cag_css = models.CharField(max_length=255)   # 商品分类描述
    cag_img = models.ImageField(upload_to='cag')  # 商品分类的小图标图标


class GoodsInfo(models.Model):
    goods_name = models.CharField(max_length=255)  # 商品的名称
    goods_price = models.IntegerField(default=0)  # 商品的价格
    goods_desc = models.CharField(max_length=255)  # 商品的描述
    goods_img = models.ImageField(upload_to='goods')  # 商品的封面
    goods_cag = models.ForeignKey(GoodsCategory, on_delete=models.CASCADE)  # 商品所属分类
    goods_tips = models.CharField(max_length=255)  # 商品的标签
    goods_org_price = models.CharField(max_length=255)  # 商品的原价
    goods_status = models.CharField(max_length=255)  # 商品的状态（是否添加都购物车）1 添加 0 未添加


class Carousel(models.Model):
    carousel_img = models.CharField(max_length=100)  # 轮播图的图片
    carousel_url = models.CharField(max_length=100)  # 轮播图的跳转路径
    carousel_desc = models.CharField(max_length=100)  # 轮播图的描述
    carousel_introduction = models.CharField(max_length=100)  # 轮播图的标题
    carousel_introduction_tow = models.CharField(max_length=100)
